﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DevExpress.Web.ASPxGridView;
using ZX.Web.UI.Controls;
using ZX.CRM.Library;
using ZX.CRM.Bussiness;

namespace ZX.WebApp.Crm.Report
{
    public partial class RptCrmDeliveryList : BasePage
    {
        BTCrmCustomer bll = new BTCrmCustomer();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                this.Session["datasource1"] = GetAllDataDeliver();
            }

            this.gvProductList.DataSource = this.Session["datasource1"];
            this.gvProductList.DataBind();
        }

        private IList<V_CrmCustomerDeliverStatistics> GetAllDataDeliver()
        {
            return bll.GetAllDataDeliver();
        }
        protected void LayoutListGrid_DataSelect(object sender, EventArgs e)
        {
            ASPxGridView gridView = sender as ASPxGridView;
            Session["productId"] = gridView.GetMasterRowKeyValue().ToString();
        }
        protected void DeptListGrid_DataSelect(object sender, EventArgs e)
        {
            ASPxGridView gridView = sender as ASPxGridView;
            Session["layoutId"] = gridView.GetMasterRowKeyValue().ToString();
        }
        protected void ASPxGridView2Grid_DataSelect(object sender, EventArgs e)
        {
            ASPxGridView gridView = sender as ASPxGridView;
            Session["trainId"] = gridView.GetMasterRowKeyValue().ToString();
        }
        protected void ASPxGridView4Grid_DataSelect(object sender, EventArgs e)
        {
            ASPxGridView gridView = sender as ASPxGridView;
            Session["projectId"] = gridView.GetMasterRowKeyValue().ToString();
        }
    }
}